package vip.hello520.service;

import vip.hello520.model.ResultBean;
import vip.hello520.model.UserPo;

import java.util.Set;

public interface LoginService {
    /**
     * 用于shiro验证用户
     *
     * @param name
     * @return
     * @throws Exception
     */
    UserPo getUserPoByName(String name) throws Exception;

    /**
     * 用于shiro获取用户角色
     *
     * @param userId
     * @return
     * @throws Exception
     */
    Set<String> getRolePoListByUserId(Integer userId) throws Exception;

    /**
     * 用于shiro获取权限
     *
     * @param userId
     * @return
     * @throws Exception
     */
    Set<String> getPowerPoListByUserId(Integer userId) throws Exception;

    /**
     * 注册
     *
     * @param userPo
     * @return
     * @throws Exception
     */
    ResultBean regUser(UserPo userPo) throws Exception;
}
